function showCust_tr(val){
	if(val=="updateCustWeb"){
		document.getElementById("cust_tr").style.display="";
	}else{
		document.getElementById("cust_tr").style.display="none";
		document.getElementById("task_param_bak").value="";
	}
}
function init_tr(){
	if(document.getElementById("task_param_bak").value!=""){
		document.getElementById("cust_tr").style.display="";
		
	}
	
}
 function showLinkCompany(){
   var gURL = "/program/admin/task/showMoreCompany.jsp?height=400&width=500";  
   var title ="企业会员";  
   TB_show(title,gURL,true); 
} 
function linkCompanyOpr(cust_id,cust_name,area_attr)
{
		var req_url="cust_id="+cust_id+"&cust_name="+encodeURI(encodeURI(cust_name))+"&area_attr="+area_attr;
		document.location.href="/program/admin/task/addInfo.jsp?"+req_url;
		
		TB_remove();
}  
function searchForm(){
	
	document.indexForm.submit()
}

	function trim(str){ 
	  return str.replace(/^\s+|\s+$/g,''); 
	} 
function subform(){
	var obj = document.getElementById("task_method");
	var task_value = obj.options[obj.selectedIndex].value;
  	var task_name = obj.options[obj.selectedIndex].text;
  	if(task_value=="updateCustWeb"){
  		if(document.addForm.task_param.value==""){
  			alert("请选择要更新的会员");
  			return false;
  		}	
  	}
  	
  	var task_method = document.getElementById("task_method").value;

	if(task_method==""){
		alert("请选择任务名称！");
		return false;
	}
  	document.addForm.task_name.value=task_name;
	document.addForm.submit();
}

//限制数字全角状态输入 允许中文输入
function   clearSBC(){ 
window.clipboardData.setData( 'text ',clipboardData.getData( 'text ').replace(/[\uFF00-\uFFFF]/g, ' ')) 
} 